This little INIT will help prevent accidental erasure of floppys, disks...(anything that can be erased from the Finder). Your startup disk is protected against accidental erasure because it holds the active system. But if you have more than one hard disk, the other ones don't get that "automatic” protection.
So I wrote this quick hack to hide the erase command from users who are not supposed to use it. When No Erase is installed, you can't select “Erase disk…” from the Special menu in the Finder, unless you hold down a “hot key” while pulling down the menu. The default “hot key” is the command key. The “hot key” code is stored in the 'pref' resource ID 128 in No Erase. You can change it with ResEdit (a template is provided).
No Erase uses the process manager to check if the Finder is the front app. Thus, it requires System 7.0 or higher. If you install it under System 6.x or lower, it won't do anything nor should it cause the system to crash, but this was not tested.
No Erase assumes that your Finder type is 'FNDR', that the special menu ID is 261 and that the “Erase disk…” command is the 5th item in the Special menu (separator lines count as items). If this is not the case, don't use No Erase !!!
No Erase is free and may be distributed freely. Please, don't distribute the INIT without this document.
I know the icon is ugly (fortunately, you won't see it at startup), but hey it's only a hack.
Disclaimer
----------
This software comes without any warranty. It has not been extensively tested.
Use it at your own risk.
Author
------
Feel free to send me comments, suggestions or bug reports.
Patrick Stadelmann
Vergers 22
2022 Bevaix
SWITZERLAND
e-mail : Patrick.Stadelmann@etudiants.unine.ch
Version history
---------------
1.0a1
First try...
1.0a2
Fixes a bug which caused sporadic crashes (forgot to initialize some ProcessInfoRec fields...).
1.0a3
Now save and restore register a1 (some programms expect a1 to be preserved by some Toolbox routines even if IM says these routines may modify a1).
1.0a4
Finally correctly saves and restores registers
1.0 — First released version
Now dims the “Erase disk” item when the “hot” key is up.